﻿using Huirui.Cavan.Domain.Seedwork;
using System;
using System.Collections;

namespace Huirui.Cavan.Domain.MainBoundedContext.SystemModule
{
    #region FeeType

    /// <summary>
    /// FeeType object for NHibernate mapped table 'FeeType'.
    /// </summary>
    [Serializable]
    public class FeeType : Persistent
    {
        #region Member Variables

        protected string _name;
        protected string _value;
        protected Corporation _corporation;

        #endregion

        #region Constructors

        public FeeType() { }

        public FeeType(string name, string value, DateTime createDate, DateTime modifyDate, int editUser, Corporation corporation)
        {
            this._name = name;
            this._value = value;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._corporation = corporation;
        }

        #endregion

        #region Public Properties

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (value != null && value.Length > 100)
                    throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
                _name = value;
            }
        }

        public virtual string Value
        {
            get { return _value; }
            set
            {
                if (value != null && value.Length > 10)
                    throw new ArgumentOutOfRangeException("Invalid value for Value", value, value.ToString());
                _value = value;
            }
        }

        public virtual Corporation Corporation
        {
            get { return _corporation; }
            set { _corporation = value; }
        }



        #endregion
    }
    #endregion
}